gtk4.git
12 years agoTajik translation updated
Victor Ibragimov [Thu, 11 Jul 2013 15:13:07 +0000 (20:13 +0500)]
Tajik translation updated

12 years agoTajik translation updated
Victor Ibragimov [Thu, 11 Jul 2013 12:52:02 +0000 (17:52 +0500)]
Tajik translation updated

12 years agoTajik translation updated
Victor Ibragimov [Wed, 10 Jul 2013 08:51:32 +0000 (13:51 +0500)]
Tajik translation updated

12 years agoDelete gtk/extract-strings binary from source
Colin Walters [Wed, 10 Jul 2013 03:24:19 +0000 (23:24 -0400)]
Delete gtk/extract-strings binary from source

It was accidentally committed to git.

12 years agoBump version
Matthias Clasen [Wed, 10 Jul 2013 00:28:03 +0000 (20:28 -0400)]
Bump version

12 years ago3.9.8
Matthias Clasen [Tue, 9 Jul 2013 21:45:07 +0000 (17:45 -0400)]
3.9.8

12 years agoRemove debug spew
Matthias Clasen [Wed, 10 Jul 2013 00:06:23 +0000 (20:06 -0400)]
Remove debug spew

12 years agoDon't segfault when setting opacity on an offscreen window
Matthias Clasen [Wed, 10 Jul 2013 00:05:46 +0000 (20:05 -0400)]
Don't segfault when setting opacity on an offscreen window

This was causing the treeview tests to fail.

12 years agoRevert the private macro change for GtkToolButton
Matthias Clasen [Tue, 9 Jul 2013 23:18:08 +0000 (19:18 -0400)]
Revert the private macro change for GtkToolButton

There was a reason that GtkToolButton was not using the
G_DEFINE_TYPE macros - we need the klass argument to get
the proper button type at init time.

12 years agowayland: Handle the display connection erroring out
Rob Bradford [Tue, 9 Jul 2013 17:08:21 +0000 (18:08 +0100)]
wayland: Handle the display connection erroring out

wl_display_flush or wl_display_dispatch can return -1 if there is an
error on the display connection.

https://bugzilla.gnome.org/show_bug.cgi?id=703892

12 years agowayland: Don't clear revents until we've checked for G_IO_HUP
Kristian Høgsberg [Tue, 9 Jul 2013 22:35:06 +0000 (18:35 -0400)]
wayland: Don't clear revents until we've checked for G_IO_HUP

https://bugzilla.gnome.org/show_bug.cgi?id=703892

12 years agoFix a typo
Matthias Clasen [Tue, 9 Jul 2013 17:49:39 +0000 (13:49 -0400)]
Fix a typo

12 years agoDocument new environment variables
Matthias Clasen [Tue, 9 Jul 2013 14:07:10 +0000 (10:07 -0400)]
Document new environment variables

Explain GDK_SCALE and GDK_DPI_SCALE.

12 years agoAdd new api to the gtk docs
Matthias Clasen [Tue, 9 Jul 2013 13:52:48 +0000 (09:52 -0400)]
Add new api to the gtk docs

12 years agoAdd new gdk api to the docs
Matthias Clasen [Tue, 9 Jul 2013 13:43:18 +0000 (09:43 -0400)]
Add new gdk api to the docs

12 years agoDeprecate and hardcode gtk-recent-files-limit
William Jon McCann [Mon, 8 Jul 2013 20:42:44 +0000 (16:42 -0400)]
Deprecate and hardcode gtk-recent-files-limit

The GtkRecentChooser already has a property that can be used
to set this on a per widget basis and the recent manager already
has a max-age limit.

12 years agoplaces sidedbar: deal with lack of symbolics
Matthias Clasen [Tue, 9 Jul 2013 11:12:18 +0000 (07:12 -0400)]
places sidedbar: deal with lack of symbolics

Use g_themed_icon_new_with_default_fallbacks, so we don't end up
without icons when the theme doesn't have symbolic icons.

https://bugzilla.gnome.org/show_bug.cgi?id=703606

12 years agoContinue the deprecation of GtkIconSet
Kjell Ahlstedt [Fri, 5 Jul 2013 13:42:31 +0000 (15:42 +0200)]
Continue the deprecation of GtkIconSet

Deprecate gtk_icon_set_render_icon_surface() and gtk_image_get_icon_set(),
which take parameters of the deprecated GtkIconSet.

https://bugzilla.gnome.org/show_bug.cgi?id=703616

12 years agoFix some inconsistent deprecations
Kjell Ahlstedt [Fri, 5 Jul 2013 13:17:24 +0000 (15:17 +0200)]
Fix some inconsistent deprecations

Some functions had only a deprecation comment in the .c file, or only a
deprecation annotation in the .h file. Add the missing parts.

https://bugzilla.gnome.org/show_bug.cgi?id=703616

12 years agogtkrecentmanager: Avoid confusion between the meta-data and the actual resource.
aakash [Mon, 8 Jul 2013 21:41:27 +0000 (03:11 +0530)]
gtkrecentmanager: Avoid confusion between the meta-data and the actual resource.

Fixed the documentation to clarify that gtk_recent_info_get_visited
and gtk_recent_info_get_modified are actually about the recent info
meta-data rather than the resource itself.

https://bugzilla.gnome.org/show_bug.cgi?id=703827

12 years agoTajik translation updated
Victor Ibragimov [Tue, 9 Jul 2013 10:11:15 +0000 (15:11 +0500)]
Tajik translation updated

12 years agowayland: request appropriate compositor version to support buffer scale
Rob Bradford [Tue, 9 Jul 2013 09:04:12 +0000 (10:04 +0100)]
wayland: request appropriate compositor version to support buffer scale

With the introduction of the use of buffer scaling in ed4fcee4ct we
must request version 3 of the compositor as that is the version of the
surface interface that adds this new functionality. See the following
commit in weston:

commit a85118c1b85df6fbf8f896dca971a5b79a94da71
Author: Jason Ekstrand <jason@jlekstrand.net>
Date:   Thu Jun 27 20:17:02 2013 -0500

    Use wl_resource_create() for creating resources

    This commit sets the version numbers for all added/created objects.  The
    wl_compositor.create_surface implementation was altered to create a surface
    with the same version as the underlying wl_compositor.  Since no other
    "child interfaces" have version greater than 1, they were all hard-coded to
    version 1.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
https://bugzilla.gnome.org/show_bug.cgi?id=703817

12 years agodocs: Update the coding style
Emmanuele Bassi [Thu, 4 Jul 2013 23:09:37 +0000 (00:09 +0100)]
docs: Update the coding style

We should mention that newly written code should not have the private
data pointer in the instance structure, and that private data should be
added using the new GObject macros.

https://bugzilla.gnome.org/show_bug.cgi?id=702996

12 years agotests: Use the new macros for adding instance private data
Emmanuele Bassi [Thu, 4 Jul 2013 23:09:31 +0000 (00:09 +0100)]
tests: Use the new macros for adding instance private data

https://bugzilla.gnome.org/show_bug.cgi?id=702996

12 years agogtk-demo: Use the new macros for adding instance private data
Emmanuele Bassi [Thu, 4 Jul 2013 23:09:12 +0000 (00:09 +0100)]
gtk-demo: Use the new macros for adding instance private data

https://bugzilla.gnome.org/show_bug.cgi?id=702996

12 years agodeprecated: Use the new macros for adding instance private data
Emmanuele Bassi [Thu, 4 Jul 2013 23:08:37 +0000 (00:08 +0100)]
deprecated: Use the new macros for adding instance private data

https://bugzilla.gnome.org/show_bug.cgi?id=702996

12 years agogtk: Use new macros for defining private data
Emmanuele Bassi [Thu, 27 Jun 2013 19:02:52 +0000 (20:02 +0100)]
gtk: Use new macros for defining private data

https://bugzilla.gnome.org/show_bug.cgi?id=702996

12 years agoa11y: Use new macros for defining private data
Emmanuele Bassi [Mon, 24 Jun 2013 18:13:44 +0000 (19:13 +0100)]
a11y: Use new macros for defining private data

https://bugzilla.gnome.org/show_bug.cgi?id=702996

12 years agogdk: Use new macros for defining private data
Emmanuele Bassi [Mon, 24 Jun 2013 17:54:05 +0000 (18:54 +0100)]
gdk: Use new macros for defining private data

Drop the g_type_class_add_private() function, and use the macros
instead.

https://bugzilla.gnome.org/show_bug.cgi?id=702996

12 years agoBump GLib dependency to 2.37.3
Emmanuele Bassi [Mon, 24 Jun 2013 17:52:05 +0000 (18:52 +0100)]
Bump GLib dependency to 2.37.3

https://bugzilla.gnome.org/show_bug.cgi?id=702996

12 years agoGtkSearchBar: Don't show a close button by default
Bastien Nocera [Fri, 5 Jul 2013 14:05:56 +0000 (16:05 +0200)]
GtkSearchBar: Don't show a close button by default

And mention in which cases we should show one in the documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=703656

12 years agowayland: Fix build due to missing symbol export
Jürg Billeter [Mon, 8 Jul 2013 07:41:03 +0000 (09:41 +0200)]
wayland: Fix build due to missing symbol export

https://bugzilla.gnome.org/show_bug.cgi?id=703765

12 years agotextlayout: avoid double-free when adding preedit color
Daiki Ueno [Wed, 3 Jul 2013 10:03:30 +0000 (19:03 +0900)]
textlayout: avoid double-free when adding preedit color

In add_preedit_attrs, don't free foreground/background colors already
set in the underlying text attributes (style).  They will be free'd by
release_style.

https://bugzilla.gnome.org/show_bug.cgi?id=703533

12 years agoFix the small text for text in GtkAboutDialog
Matthias Clasen [Tue, 9 Jul 2013 01:46:43 +0000 (21:46 -0400)]
Fix the small text for text in GtkAboutDialog

The conversion from gtk_widget_override_font to a GtkTextTag
in fbbb66ae7d19516b7a99de3d8b0a96164fb3ead2 was defective.

https://bugzilla.gnome.org/show_bug.cgi?id=701119

12 years agoAdd missing G_PARAM_DEPRECATED to stock deprecations
William Jon McCann [Mon, 8 Jul 2013 19:39:55 +0000 (15:39 -0400)]
Add missing G_PARAM_DEPRECATED to stock deprecations

12 years agoAdd missing G_PARAM_DEPRECATED to gtksettings
William Jon McCann [Mon, 8 Jul 2013 19:28:25 +0000 (15:28 -0400)]
Add missing G_PARAM_DEPRECATED to gtksettings

12 years agoDeprecate and hardcode default toolbar icon size setting
William Jon McCann [Mon, 8 Jul 2013 17:45:01 +0000 (13:45 -0400)]
Deprecate and hardcode default toolbar icon size setting

Toolbar icon size can still be changed on a per-widget basis as
needed by the application developer.

12 years agoDeprecate and hardcode default toolbar style setting
William Jon McCann [Mon, 8 Jul 2013 17:28:48 +0000 (13:28 -0400)]
Deprecate and hardcode default toolbar style setting

Toolbar style can still be changed on a per-widget basis as
needed by the application developer.

12 years agoDeprecate and hardcode values for gtk-tooltip* timeouts
William Jon McCann [Mon, 8 Jul 2013 17:13:23 +0000 (13:13 -0400)]
Deprecate and hardcode values for gtk-tooltip* timeouts

12 years agoDeprecate and hardcode the value of visible-focus setting
William Jon McCann [Mon, 8 Jul 2013 16:53:23 +0000 (12:53 -0400)]
Deprecate and hardcode the value of visible-focus setting

Just use the default value of AUTOMATIC and make it just work.

12 years agobuild: Update for perf/ directory removal
Benjamin Otte [Mon, 8 Jul 2013 14:23:42 +0000 (16:23 +0200)]
build: Update for perf/ directory removal

Ooops.

12 years agoperf: Delete
Benjamin Otte [Mon, 8 Jul 2013 14:17:46 +0000 (16:17 +0200)]
perf: Delete

The perf/ directory was unused and the code was outdated. So it's easier
to delete than trying to modernize the code.

12 years agotools: Fix casting warnings
Benjamin Otte [Mon, 8 Jul 2013 14:17:18 +0000 (16:17 +0200)]
tools: Fix casting warnings

12 years agofix close button in testtitlebar as well
Matthias Clasen [Sun, 7 Jul 2013 01:53:15 +0000 (21:53 -0400)]
fix close button in testtitlebar as well

Same disease as with the previous fix.

12 years agocsd: Fix up close buttons
Matthias Clasen [Sun, 7 Jul 2013 01:49:25 +0000 (21:49 -0400)]
csd: Fix up close buttons

Must pass the window as first argument to the signal handler.

12 years agoCosmetics
Matthias Clasen [Sat, 6 Jul 2013 01:43:16 +0000 (21:43 -0400)]
Cosmetics

12 years agoUpdated POTFILES.skip
Piotr Drąg [Sat, 6 Jul 2013 15:09:15 +0000 (17:09 +0200)]
Updated POTFILES.skip

12 years agoUpdated Vietnamese translation
Trần Ngọc Quân [Sat, 6 Jul 2013 11:39:37 +0000 (18:39 +0700)]
Updated Vietnamese translation

12 years agopo/vi: import from Damned Lies
Nguyễn Thái Ngọc Duy [Sat, 6 Jul 2013 11:30:54 +0000 (18:30 +0700)]
po/vi: import from Damned Lies

12 years agoDon't prematurely mark window as realized
Matthias Clasen [Fri, 5 Jul 2013 21:15:31 +0000 (17:15 -0400)]
Don't prematurely mark window as realized

Other code assumes that the widget has a window if it is realized.
Since we might trigger such code indirectly from gtk_window_realize,
don't mark the window as realized before we've registered its window.

12 years agoCosmetic cleanups
Matthias Clasen [Fri, 5 Jul 2013 18:24:38 +0000 (14:24 -0400)]
Cosmetic cleanups

Avoid some unnecessary casts.

12 years agocsd: hide invisible borders when tiled or fullscreen
Matthias Clasen [Fri, 5 Jul 2013 18:53:05 +0000 (14:53 -0400)]
csd: hide invisible borders when tiled or fullscreen

This is the expected behavior, and matches what mutter does.

12 years agocsd: fix a resizing artifacts when unmaximizing
Matthias Clasen [Fri, 5 Jul 2013 18:25:30 +0000 (14:25 -0400)]
csd: fix a resizing artifacts when unmaximizing

When using Super-up/down to maximize and unmaximize a csd window,
the titlebar and content was not picking up the window borders.

12 years agocsd: no border when fullscreen
Matthias Clasen [Fri, 5 Jul 2013 17:59:41 +0000 (13:59 -0400)]
csd: no border when fullscreen

The was a missing fullscreen check in get_decoration_size was causing
the window background to have a transparent border when fullscreen.

12 years agoreftest: Add reftest for scaled image borders - fails on GDK_SCALE=2
Alexander Larsson [Fri, 5 Jul 2013 13:21:55 +0000 (15:21 +0200)]
reftest: Add reftest for scaled image borders - fails on GDK_SCALE=2

12 years agogtk-demo: Properly cleanup the revealer demo
Matthias Clasen [Thu, 4 Jul 2013 21:52:09 +0000 (17:52 -0400)]
gtk-demo: Properly cleanup the revealer demo

We forgot to remove the timeout.

12 years agoGtkListBox: Add g_return_if_fail checks to public row functions
Kalev Lember [Thu, 4 Jul 2013 13:50:09 +0000 (15:50 +0200)]
GtkListBox: Add g_return_if_fail checks to public row functions

12 years agotestsuite: Add tests for gtk_list_box_row_get_index
Kalev Lember [Thu, 4 Jul 2013 12:15:22 +0000 (14:15 +0200)]
testsuite: Add tests for gtk_list_box_row_get_index

https://bugzilla.gnome.org/show_bug.cgi?id=703618

12 years agoGtkListBox: Add a function for getting the index of a row
Kalev Lember [Thu, 4 Jul 2013 11:40:21 +0000 (13:40 +0200)]
GtkListBox: Add a function for getting the index of a row

https://bugzilla.gnome.org/show_bug.cgi?id=703618

12 years agoGtkListBox: Remove a double semicolon
Kalev Lember [Thu, 4 Jul 2013 11:39:07 +0000 (13:39 +0200)]
GtkListBox: Remove a double semicolon

12 years agostack: Use normal opacity groups rather than weird ones in GtkWidget
Alexander Larsson [Thu, 4 Jul 2013 11:30:51 +0000 (13:30 +0200)]
stack: Use normal opacity groups rather than weird ones in GtkWidget

Since we now do all drawing propagation on the cairo_t (rather than
exposing multiple independent times on the GdkWindows) we no longer
need the opacity 0.999 hack.

12 years agowidget: Remove some leftover code
Alexander Larsson [Thu, 4 Jul 2013 11:16:05 +0000 (13:16 +0200)]
widget: Remove some leftover code

The norender stuff is not used anymore

12 years agowidget: Don't crash if setting alpha on non-realized widget.
Alexander Larsson [Thu, 4 Jul 2013 10:54:59 +0000 (12:54 +0200)]
widget: Don't crash if setting alpha on non-realized widget.

https://bugzilla.gnome.org/show_bug.cgi?id=703154

12 years agoGtkSearchBar: Fix automatic entry connection
Bastien Nocera [Mon, 1 Jul 2013 17:46:13 +0000 (19:46 +0200)]
GtkSearchBar: Fix automatic entry connection

Adding an entry to the search bar didn't automatically connect
the signals as expected as the code was in the wrong branch.

https://bugzilla.gnome.org/show_bug.cgi?id=703406

12 years agoAvoid deprecation warning
Matthias Clasen [Wed, 3 Jul 2013 23:52:11 +0000 (19:52 -0400)]
Avoid deprecation warning

There was one overlooked use of GTK_STOCK_MISSING_IMAGE.

12 years agowayland: Create the Wayland surface for the window on impl creation
Rob Bradford [Wed, 3 Jul 2013 15:19:39 +0000 (16:19 +0100)]
wayland: Create the Wayland surface for the window on impl creation

Ths allows the retrieval of the wl_surface before the window is shown.
The surface is still created in the original places since the surface
and shell surface is destroyed when the surface is programmatically
hidden.

12 years agowayland: Fix typo in setting of core_pointer
Michael Forney [Mon, 1 Jul 2013 22:51:20 +0000 (15:51 -0700)]
wayland: Fix typo in setting of core_pointer

This typo caused the display's core_pointer to be set only if the mouse
was first in the device list.

https://bugzilla.gnome.org/show_bug.cgi?id=703434

12 years agowayland: Add custom create_similar_image implementation
Alexander Larsson [Wed, 3 Jul 2013 14:03:25 +0000 (16:03 +0200)]
wayland: Add custom create_similar_image implementation

The fallback method is used on other backends, but it caused
problems for wayland when it tried to create a surface for
the root window.

12 years agoFile chooser: Convert icons to using cairo_surface_t
Alexander Larsson [Wed, 3 Jul 2013 11:26:03 +0000 (13:26 +0200)]
File chooser: Convert icons to using cairo_surface_t

12 years agoGtkCellRendererPixbuf: Add surface property
Alexander Larsson [Wed, 26 Jun 2013 14:34:53 +0000 (16:34 +0200)]
GtkCellRendererPixbuf: Add surface property

12 years agoGtkImage: Add new_from_surface() and set_from_surface()
Alexander Larsson [Wed, 26 Jun 2013 14:33:50 +0000 (16:33 +0200)]
GtkImage: Add new_from_surface() and set_from_surface()

12 years agoGtkIconHelper: Convert to using cairo surfaces as base and support scales
Alexander Larsson [Mon, 24 Jun 2013 12:13:43 +0000 (14:13 +0200)]
GtkIconHelper: Convert to using cairo surfaces as base and support scales

We render the source into a cairo_surface_t so that we can render it
with cairo directly, rather than having to convert it from a pixbuf
every time. We also specify the target window when creating the cairo
surface so that rendering can be faster.

Using cairo surfaces also allows us to seamlessly support window scales.

We also add a GTK_IMAGE_SURFACE source type.

12 years agoicon factory: Add gtk_icon_set_render_icon_surface
Alexander Larsson [Tue, 25 Jun 2013 11:59:51 +0000 (13:59 +0200)]
icon factory: Add gtk_icon_set_render_icon_surface

Support scales when falling back to loading icons from the
icon theme.

In order to actually render scaled icons we add
gtk_icon_set_render_icon_surface which renders to a cairo_surface_t
which includes whatever scaling you need for scaled icons.

12 years agostylecontext: add gtk_render_icon_surface
Alexander Larsson [Mon, 24 Jun 2013 10:35:39 +0000 (12:35 +0200)]
stylecontext: add gtk_render_icon_surface

This draws an icon from a cairo_surface. We want to use this more rather
than render_icon as this means we can skip the pixbuf to surface
conversion (including allocation and alpha premultiplication) at
render time, plus we can use create_similar_image which may allow
faster rendering.

12 years agoGtkIconTheme: Add helpers to load to cairo_surface_t
Alexander Larsson [Wed, 26 Jun 2013 14:26:43 +0000 (16:26 +0200)]
GtkIconTheme: Add helpers to load to cairo_surface_t

Right now this just uses the pixbuf load code and converts
it to a surface. In the future we could cache the pattern
to allow reusing the surface.

12 years agoicontheme: Add support for high resolution icons
Carlos Garnacho [Fri, 10 May 2013 16:06:00 +0000 (18:06 +0200)]
icontheme: Add support for high resolution icons

An optional OutputScale integer key has been added to index.theme
subdirs description, so icon themes may provide icons that are
more suitable to render at a (typically 2x) integer upscaled
resolution. This way it is possible to make eg. a 16x16@2x icon has a
real size of 32x32, but contains a similar level of detail to the
16x16 icon so things don't look any more cluttered on high-dpi
screens.

The pixbuf lookup has changed so it prefers a minimal scale change
that yields the minimal real size difference, so if looking up for
a 16x16 icon at 2x, it would first prefer 16x16@2x, then 32x32, and
then any other icon that's closest to match

There is now *_for_scale() variants for all GtkIconTheme ways
to directly or indirectly fetch a GdkPixbuf.

This is based on code by Carlos Garnacho with changes by Alexander
Larsson

12 years agoCellRendererPixbuf: Set the window on the icon helper
Alexander Larsson [Wed, 26 Jun 2013 09:28:33 +0000 (11:28 +0200)]
CellRendererPixbuf: Set the window on the icon helper

This lets us get scaled icons if needed.

12 years agospinbutton: set the window on the icon helper
Alexander Larsson [Tue, 25 Jun 2013 12:38:08 +0000 (14:38 +0200)]
spinbutton: set the window on the icon helper

12 years agoentry: Set the window on the icon helper
Alexander Larsson [Tue, 25 Jun 2013 12:37:55 +0000 (14:37 +0200)]
entry: Set the window on the icon helper

12 years agoGtkImage: Set the window on the gtkiconhelper
Alexander Larsson [Mon, 24 Jun 2013 12:06:20 +0000 (14:06 +0200)]
GtkImage: Set the window on the gtkiconhelper

12 years agoGtkIconHelper: Add set_window()
Alexander Larsson [Mon, 24 Jun 2013 12:05:27 +0000 (14:05 +0200)]
GtkIconHelper: Add set_window()

This is a hint on where the icon will be drawn. It
will allow us to pre-allocate cairo surfaces for the right
target.

12 years agogtk-demo: Add demo of hidpi css assets via -gtk-scaled()
Alexander Larsson [Thu, 27 Jun 2013 16:32:24 +0000 (18:32 +0200)]
gtk-demo: Add demo of hidpi css assets via -gtk-scaled()

12 years agoCSS: Add -gtk-scaled(image1,image2,...) support for hidpi assets
Alexander Larsson [Thu, 27 Jun 2013 16:29:38 +0000 (18:29 +0200)]
CSS: Add -gtk-scaled(image1,image2,...) support for hidpi assets

12 years agocss: Add a scale argument to css-value compute vfunc
Alexander Larsson [Thu, 27 Jun 2013 16:26:05 +0000 (18:26 +0200)]
css: Add a scale argument to css-value compute vfunc

We need to be able to compute different GtkCssImage values
depending on the scale, and we need this at compute time so that
we don't need to read any images other than the scale in used (to
e.g. calculate the image size). GtkStyleProviderPrivate is shared
for all style contexts, so its not right.

12 years agoGtkWidget: Propagate scale to GtkStyleContext
Alexander Larsson [Thu, 27 Jun 2013 16:23:17 +0000 (18:23 +0200)]
GtkWidget: Propagate scale to GtkStyleContext

12 years agoGtkStyleContext: Add gtk_style_context_get/set_scale
Alexander Larsson [Thu, 27 Jun 2013 16:21:41 +0000 (18:21 +0200)]
GtkStyleContext: Add gtk_style_context_get/set_scale

12 years agoUse gdk_cairo_surface_create_from_pixbuf when possible
Alexander Larsson [Mon, 24 Jun 2013 10:53:53 +0000 (12:53 +0200)]
Use gdk_cairo_surface_create_from_pixbuf when possible

12 years agoAdd GDK_DPI_SCALE env var
Alexander Larsson [Thu, 20 Jun 2013 16:43:42 +0000 (18:43 +0200)]
Add GDK_DPI_SCALE env var

This is very useful for hidpi where the dpi is scaled to make
non-dpi aware apps larger. In that case a dpi aware gtk+ using
GDK_SCALE will be getting huge fonts. You can the set GDK_DPI_SCALE
to compensate for this.

12 years agogdk: Convert mouse position to doubles, add new getters
Alexander Larsson [Wed, 3 Jul 2013 09:52:58 +0000 (11:52 +0200)]
gdk: Convert mouse position to doubles, add new getters

We've long had double precision mouse coordinates on wayland (e.g.
when rotating a window) but with the new scaling we even have it on
X (and, its also in Xinput2), so convert all the internal mouse/device
position getters to use doubles and add new accessors for the
public APIs that take doubles instead of ints.

12 years agox11: Don't follow dpi and scale from xsettings when GDK_SCALE set
Alexander Larsson [Mon, 1 Jul 2013 18:50:44 +0000 (20:50 +0200)]
x11: Don't follow dpi and scale from xsettings when GDK_SCALE set

If things are hardcoded in the environment, that wins.

12 years agox11: Add Gdk/UnscaledDPI to override Xft/DPI
Alexander Larsson [Fri, 28 Jun 2013 11:23:45 +0000 (13:23 +0200)]
x11: Add Gdk/UnscaledDPI to override Xft/DPI

This lets use use a scaled Xft/DPI for old apps while not
blowing up the size of scaled windows. Only apps supporting
Gdk/WindowScaleFactor should supprt Gdk/UnscaledDPI.

12 years agox11: Support the Gdk/WindowScalingFactor xsetting
Alexander Larsson [Thu, 27 Jun 2013 20:45:40 +0000 (22:45 +0200)]
x11: Support the Gdk/WindowScalingFactor xsetting

This xsetting can be used to tell Gtk to use a specific window
scaling for the screen.

12 years agox11: Initial cut at supporting window scaling for X11
Alexander Larsson [Thu, 20 Jun 2013 09:40:07 +0000 (11:40 +0200)]
x11: Initial cut at supporting window scaling for X11

If you set GDK_SCALE=2 in the environment then all windows will be
scaled by 2. Its not an ideal solution as it doesn't handle
multi-monitors at different scales, and only affects gtk apps.
But it is a good starting points and will help a lot on HiDPI
laptops.

12 years agowayland: Support gdk_window_get_scale
Alexander Larsson [Tue, 4 Jun 2013 09:39:36 +0000 (11:39 +0200)]
wayland: Support gdk_window_get_scale

We track the list of outputs each window is on, and set the
scale to the largest scale value of the outputs. Any time the scale
changes we also emit a configure event.

12 years agowayland: Require wayland-client 1.1.90
Alexander Larsson [Tue, 4 Jun 2013 09:27:56 +0000 (11:27 +0200)]
wayland: Require wayland-client 1.1.90

This has the new methods required for buffer scaling.

12 years agowayland: Implement gdk_screen_get_monitor_scale()
Alexander Larsson [Tue, 4 Jun 2013 09:18:49 +0000 (11:18 +0200)]
wayland: Implement gdk_screen_get_monitor_scale()

We bind to the newer version of the wl_output which supports
the new done and scale events, and if we use this to get the
scale for each monitor (defaulting to 1 if not supported).

12 years agogdk: Add gdk_cairo_surface_create_from_pixbuf
Alexander Larsson [Mon, 24 Jun 2013 10:12:43 +0000 (12:12 +0200)]
gdk: Add gdk_cairo_surface_create_from_pixbuf

12 years agogdk: add gdk_window_create_similar_image_surface
Alexander Larsson [Mon, 24 Jun 2013 10:10:02 +0000 (12:10 +0200)]
gdk: add gdk_window_create_similar_image_surface

This lets us create image surfaces that render faster on specific windows.
It also supports creating scaled image surfaces.

12 years agogdkwindow: Respect cairo surfaces with device scale
Alexander Larsson [Tue, 4 Jun 2013 08:41:44 +0000 (10:41 +0200)]
gdkwindow: Respect cairo surfaces with device scale

If a cairo_surface for a window has a device scale set we need
to respect this when creating a similar window. I.e. we want
to then automatically create a larger window which inherits
the scale from the original.

We also need to calculate a different device_offset if there
is a device_scale set.

12 years agoconfigure: Add buildtime check for cairo_surface_set_device_scale
Alexander Larsson [Tue, 4 Jun 2013 08:39:32 +0000 (10:39 +0200)]
configure: Add buildtime check for cairo_surface_set_device_scale

We will need this for the window scale support, but its not yet
in a stable cairo release (or even on a master yet), so we make
this optional.